import { Token } from '@/store/reducers/login'
import { LoginForm } from '@/types/data'
import http from '@/utils/request'
import { IAxiosRes } from '.'

export function loginAPI (data: LoginForm): IAxiosRes<Token> {
  return http({
    url: '/authorizations',
    method: 'post',
    data
  })
}

export function getSMS (mobile: string) {
  return http({
    url: `/sms/codes/${mobile}`,
    method: 'get'
  })
}
